from botcore import * power = 1 thresh = 10 while True: p = prox.detect(power, thresh) leds.prox(p) sensed = prox.range(10, power)